<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Select your class!</title>
    <link rel="stylesheet" th:href="@{/styles.css}" />
</head>

<body>
<form method="POST" th:object="${taco}">

    <h1>Select your class!</h1>
    <span class="validationError"
          th:if="${#fields.hasErrors('ingredients')}"
          th:errors="*{ingredients}">Ingredient Error</span>

    <div class="ingredient-group" id="subject">
        <h3>Select your class:</h3>
        <div th:each="ingredient : ${subject}">
            <input name="ingredients" type="checkbox" th:value="${ingredient.id}" />
            <span th:text="${ingredient.name}">INGREDIENT</span><br/>
        </div>

        <button>Submit your order!</button>
    </div>

</form>

</body>
</html>


